<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8" />
  <meta name="applicable-device" content="pc,mobile">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
  <title>cardecho</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="stylesheet" href="__STATIC__/lib/index/css_new/slicy.css" />
  <link rel="stylesheet" href="__STATIC__/lib/index/css_new/swiper.min.css" />
  <link rel="stylesheet" href="__STATIC__/lib/index/css_new/style.css" />
  <link rel="stylesheet" href="__STATIC__/lib/index/css_new/responsive.css" />

  <script src="__STATIC__/lib/index/js_new/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="__STATIC__/lib/index/layui/layui.js"></script>
  <script src="__STATIC__/lib/index/js_new/swiper.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="__STATIC__/lib/index/js_new/jquery.countup.min.js"></script>
  <script src="__STATIC__/lib/index/js_new/jquery.waypoints.min.js"></script>
  <script src="__STATIC__/lib/index/js_new/wow.min.js" type="text/javascript" charset="utf-8"></script>
  <script src="__STATIC__/lib/index/js_new/script.js" type="text/javascript" charset="utf-8"></script>
  <script src="__STATIC__/js/shop.js"></script>

</head>

<body>

<div class="layout">
  <div class="uwlogin">
    <div class="uwbanner">
      <div class="swiper-wrapper">
        <div class="swiper-slide" style="background: url(__STATIC__/lib/index/images_new/qms4.jpg) no-repeat center/cover;">
          <div class="txt">
            <h4>一站式财务管理</h4>
            <h5>无论是个人还是企业，我们都提供智能化全球财务管理</h5>
          </div>
        </div>
        <div class="swiper-slide" style="background: url(__STATIC__/lib/index/images_new/qms4.jpg) no-repeat center/cover;">
          <div class="txt">
            <h4>一站式财务管理</h4>
            <h5>无论是个人还是企业，我们都提供智能化全球财务管理</h5>
          </div>
        </div>
        <div class="swiper-slide" style="background: url(__STATIC__/lib/index/images_new/qms4.jpg) no-repeat center/cover;">
          <div class="txt">
            <h4>一站式财务管理</h4>
            <h5>无论是个人还是企业，我们都提供智能化全球财务管理</h5>
          </div>
        </div>
      </div>
      <div class="spot"></div>
    </div>
    <div class="uwform">
      <form action="" method="post">
        <div class="tps">
          <a href="#" class="logo" style="font-weight: bold;font-size: 25px;color: #00aeef">CardEcho</a>
          <!--          <dl>-->
          <!--            <dd class="on"><a href="#">中</a></dd>-->
          <!--            <dd><a href="#">EN</a></dd>-->
          <!--          </dl>-->
        </div>
        <h2>修改密码</h2>
        <div class="fms">
          <ul>
            <li>
              <div class="ico">
                <img src="__STATIC__/lib/index/images_new/qms5.png" alt="">
              </div>
              <div class="rs">
                <input class="t1 t2" type="text" value="" name="username" id="username" placeholder="请输入邮箱">
                <h6 id="getsmscode" style="cursor:pointer">获取验证码</h6>
              </div>
            </li>
            <li>
              <div class="ico">
                <img src="__STATIC__/lib/index/images_new/qms6.png" alt="">
              </div>
              <input class="t1" type="text" value="" name="vercode" id="vercode" placeholder="请输入验证码(如果没有收到验证码,请检查下垃圾邮件)">
            </li>
            <li>
              <div class="ico">
                <img src="__STATIC__/lib/index/images_new/qms2.png" alt="">
              </div>
              <input class="t1" type="password" value="" name="password" id="password" placeholder="请输入密码(12-32位,大小写字母,数字和特殊字符组合)">
            </li>
            <li>
              <div class="ico">
                <img src="__STATIC__/lib/index/images_new/qms2.png" alt="">
              </div>
              <input class="t1" type="password" value="" name="confirm_password" id="confirm_password" placeholder="请再次输入密码">
            </li>
          </ul>
        </div>

        <a href="javascript:;" class="btn" id="check_sub">登 录</a>
        <div class="txts">
          <a href="{:url('index')}" class="btns">立即登录</a>
        </div>
      </form>
    </div>
  </div>

</div>

<script type="text/javascript">
  layui.use(['form'], function () {
    var form = layui.form;
    form.render();

    $('#check_sub').click(function(){
      var loading =layer.load(1, {shade: [0.1,'#fff']});

      JsPost("{:url('login/pwdChange')}", {
        username:$("#username").val(),
        vercode:$("#vercode").val(),
        password:$("#password").val(),
        confirm_password:$("#confirm_password").val(),
      }, function(res){
        layer.close(loading);
        if(res.code >0){
          layer.msg(res.msg, {time:1500}, function(){
            window.location.href = "{:url('index')}";
          });
        }else{
          layer.msg(res.msg , {time:1500});
        }
      })
    });

    $(function(){
      if(browser.versions.mobile||browser.versions.android||browser.versions.ios){
        layer.msg('请使用PC端操作.', {time: 10000});
        return false;
      }
    });

    var getCode = document.getElementById('getsmscode');
    var wait = 60;
    function time(btn){
      if (wait===0) {
        getCode.removeAttribute("disabled");
        getCode.innerHTML = "获取验证码";
        wait = 60;
      }else{
        getCode.setAttribute("disabled",true);
        getCode.innerHTML = "<font color='black'>" + wait + " </font> 秒";
        wait--;
        setTimeout(function(){
          time(btn);
        },1000);
      }
    }
    getCode.onclick = function(){
      const username = $("#username").val();
      if(!username){
        layer.msg('邮箱不能为空.',{time: 1500});
        $("#username").focus();
        return false;
      }
      const code = $("#getsmscode").text();
      if(code != '获取验证码'){
        layer.msg('正在发送中.',{time: 1500});
        return false;
      }
      var loading = layer.load(1, {shade: [0.1, '#fff']});
      $.post("{:url('login/emailSend')}", {username:username,send_type:'check_pwd'}, function (res) {
        layer.close(loading);
        if (res.code > 0) {
          time(this);
        } else {
          layer.msg(res.msg,{time: 1500});
        }
      });
    };
    var swiper = new Swiper('.hmain .lt .textswip', {
      pagination: {
        el: '.span',
      },
      speed:800,
      loop: true, //循环
      autoplay: {
        delay: 3000,
        stopOnLastSlide: false, //如果设置为true，当切换到最后一个slide时停止自动切换。（loop模式下无效）。
        disableOnInteraction: false, //用户操作swiper之后，是否禁止autoplay。默认为true：停止。
      }
    });
  });

  function openWin(){
    var layer = layui.layer;
    // $('#agreement_show').val(1);
    layer.open({
      type:2,
      //头部标题
      title:'隐私条款',
      //子层容器宽度和高度
      area:['800px','800px'],
      content:"{:url('regNotice')}",
      fix: true, //不固定
      maxmin: true,
      btn: ['关 闭'],
      shadeClose: false,//点击遮罩区域是否关闭页面
      scrollbar: false,//滚动条
    });
  }

  var browser={
    versions:function(){
      var u = navigator.userAgent,
              app = navigator.appVersion;
      return {
        trident: u.indexOf('Trident') > -1, //IE内核
        presto: u.indexOf('Presto') > -1, //opera内核
        webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
        gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1,//火狐内核
        mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
        ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
        android: u.indexOf('Android') > -1 || u.indexOf('Adr') > -1, //android终端
        iPhone: u.indexOf('iPhone') > -1 , //是否为iPhone或者QQHD浏览器
        iPad: u.indexOf('iPad') > -1, //是否iPad
        webApp: u.indexOf('Safari') == -1, //是否web应该程序，没有头部与底部
        weixin: u.indexOf('MicroMessenger') > -1, //是否微信 （2015-01-22新增）
        qq: u.match(/\sQQ/i) == " qq" //是否QQ
      };
    }(),
    language:(navigator.browserLanguage || navigator.language).toLowerCase()
  }
</script>


</body>
</html>
